package cn.brilliantfuture.commentry.entity;

// Generated 2011-12-9 18:03:45 by Hibernate Tools 3.3.0.GA

import static javax.persistence.GenerationType.IDENTITY;

import java.util.HashSet;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.validator.Length;

/**
 * LanguageInfo generated by hbm2java
 */
@Entity
@Table(name = "language_info", catalog = "cabinet")
public class LanguageInfo implements java.io.Serializable {

	private static final long serialVersionUID = 1L;
	private Integer languageInfoId;
	private String languageName;
	private Set<SmsInfo> smsInfos = new HashSet<SmsInfo>(0);
	private Set<EmailInfo> emailInfos= new HashSet<EmailInfo>(0);

	public LanguageInfo() {
	}

	public LanguageInfo(String languageName, Set<SmsInfo> smsInfos) {
		this.languageName = languageName;
		this.smsInfos = smsInfos;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "language_info_id", unique = true, nullable = false)
	public Integer getLanguageInfoId() {
		return this.languageInfoId;
	}

	public void setLanguageInfoId(Integer languageInfoId) {
		this.languageInfoId = languageInfoId;
	}

	@Column(name = "language_name", length = 50)
	@Length(max = 50)
	public String getLanguageName() {
		return this.languageName;
	}

	public void setLanguageName(String languageName) {
		this.languageName = languageName;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "languageInfo")
	public Set<SmsInfo> getSmsInfos() {
		return this.smsInfos;
	}

	public void setSmsInfos(Set<SmsInfo> smsInfos) {
		this.smsInfos = smsInfos;
	}
	
	@OneToMany(fetch = FetchType.LAZY, mappedBy = "languageInfo")
	public Set<EmailInfo> getEmailInfos() {
		return emailInfos;
	}

	public void setEmailInfos(Set<EmailInfo> emailInfos) {
		this.emailInfos = emailInfos;
	}

}
